import { setupVab } from "~/library";
import App from "./App.vue";
import '/@/assets/styles/common.scss'
import { setupI18n } from "/@/i18n";
import { setupRouter } from "/@/router";
import { setupStore } from "/@/store";
import FORM_FIELD_TYPE from "/@/constants/FormFieldType";

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import '~/library/styles/style.css'

const app = createApp(App);
app.use(ElementPlus, {
    locale: zhCn,
})

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

setupVab(app);
setupI18n(app);
setupStore(app);
setupRouter(app);
app.config.globalProperties.$FORM_FIELD_TYPE = FORM_FIELD_TYPE;

app.mount("#app");

export default app;
